package com.astrob.tspant;


import java.io.Serializable;
import java.util.ArrayList;

/**
 * Created by colin on 2018/5/8.
 */

//this.mLatNorthE6 = (int) (north * 1E6);

public class ABPath implements Serializable {
    private static final long serialVersionUID = -870520749171665437L;

    public PointE A = new PointE();
    public PointE B = new PointE();//

    public ArrayList<PointE> path = new ArrayList<PointE>();//A->B 的最短路径；可以用来绘制
    public double lenA2B = 0;       //A->B 的最短路径距离; 邻接矩阵 i->j的距离

    public int AIndex = 0;//对应邻接矩阵的 i
    public int BIndex = 0;//对应邻接矩阵的 j

    public ABPath() {

    }

    public boolean isMatch(int i, int j) {
        if (i == AIndex && j == BIndex) {
            return true;
        }

        //可以逆向
        if (j == AIndex && i == BIndex) {
            return true;
        }

        return false;
    }

}
